<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    console.log(a);
</script>
<script>
    console.log(a);
    console.log(a);
    console.log(a);
    var a = 10;
    console.log(a);
    // console.log(b)
    function fn(){
        console.log(b)
        var b = 20;
        console.log(b)
        console.log(a);
    }
    fn();
    // console.log(b)
    console.log(a);
</script>
<script>
    console.log(a);
</script>
</html>